package jmcnet.libcommun.security
{
	import flexunit.framework.Assert;
	import flexunit.framework.TestCase;
	import flexunit.framework.TestSuite;

	public class MD5Test extends TestCase
	{
		public function MD5Test(methodName:String=null)
		{
			super(methodName);
		}
		
		public static function suite():TestSuite {
   			var ts:TestSuite = new TestSuite();
   			
   			ts.addTest( new MD5Test( "testMD5" ) );
   			return ts;
   		}
		
		public function testMD5():void {
			var res:String = MD5.encrypt("root");
			trace("Encrypted 'root' ="+res);
			Assert.assertEquals("63a9f0ea7bb98050796b649e85481845", res);
		
			res = MD5.encrypt("jmc");
			trace("Encrypted 'jmc' ="+res);
			Assert.assertEquals("2b044c7f54df52545e7ef5717efb2415", res);
		}
		
	}
}